package fhp.hlhj.giantfold.adapter

import android.content.Context
import android.util.SparseArray
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.BaseAdapter
import android.widget.ImageView
import android.widget.TextView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import fhp.hlhj.giantfold.R
import fhp.hlhj.giantfold.javaBean.TittleBean
import fhp.hlhj.giantfold.network.Urls
import java.util.ArrayList

/**
 * Created by Administrator on 2018\2\7 0007.
 */
class FindGoodsAdp(val layoutId:Int,private val datas:ArrayList<TittleBean.DataBean>) :BaseQuickAdapter<TittleBean.DataBean,BaseViewHolder>(layoutId,datas) {
    override fun convert(helper: BaseViewHolder?, item: TittleBean.DataBean?) {
        val icon = helper?.getView<ImageView>(R.id.itemIcon)

        Glide.with(mContext).load(Urls.BaseUrl+item?.savepath+item?.savename).asBitmap().dontAnimate().placeholder(R.mipmap.placeholdericon).into(icon)
        helper?.setText(R.id.itemTittle,item?.name)
        helper?.setText(R.id.itemInfo,item?.note)
    }
}